package com.wsj.web.form.member;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;

public class BroadcastForm extends ActionForm{

	/**
	 * 
	 */
	private static final long serialVersionUID = 7368541117531705490L;
	
	private int memberType;
	private String msgTitle;
	private String msgContent;
	@Override
	public void reset(ActionMapping mapping, HttpServletRequest request) {
		// TODO Auto-generated method stub
		this.memberType=0;
		this.msgTitle="";
		this.msgContent="";
	}
	@Override
	public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
		// TODO Auto-generated method stub
		ActionErrors actionErrors = new ActionErrors();
		if(null==msgTitle || "".equals(msgTitle))actionErrors.add("msgTitleErr", new ActionMessage("msgTitleErr"));
		if(null==msgContent || "".equals("msgContent"))actionErrors.add("msgContentErr", new ActionMessage("msgContentErr"));
		return actionErrors;
	}
	public int getMemberType() {
		return memberType;
	}
	public void setMemberType(int memberType) {
		this.memberType = memberType;
	}
	public String getMsgContent() {
		return msgContent;
	}
	public void setMsgContent(String msgContent) {
		this.msgContent = msgContent;
	}
	public String getMsgTitle() {
		return msgTitle;
	}
	public void setMsgTitle(String msgTitle) {
		this.msgTitle = msgTitle;
	}


}
